#include "controlDevice.h"
#include <stdlib.h>
#include <stdio.h>
restaurantLightOpen(int pinNum)
{
  digitalWrite(pinNum, LOW);
};

restaurantLightClose(int pinNum)
{
  digitalWrite(pinNum, HIGH);
};
restaurantLightInit(int pinNum)
{
  pinMode(pinNum, OUTPUT);
  digitalWrite(pinNum, HIGH);
};
restaurantLightStaus(int staus){

};
struct Devices restaurantLight = {
    .devicesName = "restaurantLight",
    .pinNum = 2,
    .open = restaurantLightOpen,
    .close = restaurantLightClose,
    .deviceInit = restaurantLightInit,
    .changeStaus = restaurantLightStaus

};
struct Devices *addrestaurantLightToDeviceLink(struct Devices *pthead)
{
  if (pthead == NULL)
  {
    return &restaurantLight;
  }
  else
  {

    restaurantLight.next = pthead;
    pthead = &restaurantLight;
    return pthead;
  }
}
